import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

export default new Vuex.Store({
    state:{
          name :'',
          id :'',
          gender :'',
          email :'',
          phone :'',
          exam :''
    },
    mutations: {
      updateUserId(state,id1) {
        this.state.id = id1;
      },
      updateUserName(state,name1) {
        this.state.name = name1;
      },
      updateUserGender(state,gender1) {
        if (gender1==1){
          this.state.gender = '男';
        }
        else{
          this.state.gender = '女';
        }
      },
      reUserGender(state,gender1) {
        this.state.gender=gender1;
      },
      updateUserEmail(state,email1) {
        this.state.email = email1;
      },
      updateUserPhone(state,phone1) {
        this.state.phone = phone1;
      },
	}
})

